import request from '@/utils/request'

// 查询密品柜子列表
export function listBasCabinet(query) {
  return request({
    url: '/bas/basCabinet/list',
    method: 'get',
    params: query
  })
}

// 查询仓库下拉框
export function listWarehouseOptions(query) {
  return request({
    url: '/bas/basWarehouse/warehouseOptions',
    method: 'get',
    params: query
  })
}

// 查询密品柜子详细
export function getBasCabinet(cabinetId) {
  return request({
    url: '/bas/basCabinet/' + cabinetId,
    method: 'get'
  })
}

// 新增密品柜子
export function addBasCabinet(data) {
  return request({
    url: '/bas/basCabinet',
    method: 'post',
    data: data
  })
}

// 修改密品柜子
export function updateBasCabinet(data) {
  return request({
    url: '/bas/basCabinet',
    method: 'put',
    data: data
  })
}

// 删除密品柜子
export function delBasCabinet(cabinetId) {
  return request({
    url: '/bas/basCabinet/' + cabinetId,
    method: 'delete'
  })
}
